#!/bin/bash

rm -rf build
mkdir build
cd build
clear

cmake ../
make 

cd ..

rm -rf pwm_demo
mkdir pwm_demo
cd pwm_demo

cp ../build/PWM_DEMO .
cp ../../c-periphery-src/lib/libperiphery.a .

cd ..

cp run.sh ./pwm_demo -rf

rm -rf ~/Public/pwm_demo
cp pwm_demo ~/Public -rf
chmod -R 777 ~/Public

